package cn.ss.exam2302.web;

import cn.ss.exam2302.entity.Answer;
import cn.ss.exam2302.entity.JsonResult;
import cn.ss.exam2302.service.AnswerService;
import cn.ss.exam2302.service.QuestionService;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AnswerController {
    @Autowired
    private AnswerService answerService;

    @PostMapping("/answer")
    @RequiresRoles("USER")
    @ResponseBody
    public void answer(Integer paId, Integer pos, Character ansSelect){
        answerService.answer(paId, pos, ansSelect);
    }
}
